<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img{
            width: 200px;
            height: 200px;
        }
        #ou {width:560px;
            margin:0 
            auto;border:1px solid red;
            text-align: center;
            font-size:0;
            padding:0 0 10px 10px;
            overflow:hidden;
            zoom:1}
        #ou img {border:1px solid black;margin:10px 10px 0 0 ;cursor:crosshair;
            opacity:0.5; filter:alpha(opacity=50);
        }
    </style>
</head>
<body>
    <div id="ou">
        <img src="./img/1.jpg" alt="">
        <img src="./img/1.jpg" alt="">
        <img src="./img/1.jpg" alt="">
    </div>
    <script>
          window.onload = function() {
            var ys = document.getElementsByTagName("img");
            for(var i=0;i<ys.length;i++) {
                ys[i].onmouseover = function() {
                    this.style.cssText = "opacity:1.0;filter:alpha(opacity:100)";
                }
                ys[i].onmouseout = function() {
                    this.style.cssText = "";
                }
            }
        }
    </script>
</body>
</html>